{{include file="public/header" /}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
        <!-- operation start -->
        <div class="am-g">
            <a href="{{:MyUrl('admin/power/rolesaveinfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> 新增</a>
        </div>
        <!-- operation end -->

        <!-- list start -->
        <div class="am-scrollable-horizontal am-table-scrollable-horizontal am-margin-top-sm">
            <table class="am-table am-table-striped am-table-hover am-table-bordered am-text-nowrap am-table-td-fixed-last">
				<thead>
					<tr>
						<th>名称</th>
						<th class="am-text-center">状态</th>
						<th>创建时间</th>
						<th class="am-text-center" data-width="170">操作</th>
					</tr>
				</thead>
				<tbody>
					{{if !empty($data_list)}}
						{{foreach $data_list as $v}}
							<tr id="data-list-{{$v.id}}" {{if $v['is_enable'] eq 0}}class="am-active"{{/if}}>
								<td class="am-text-middle">{{$v.name}}</td>
								<td class="am-text-middle am-text-center">
									<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/power/RoleStatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
								</td>
								<td class="am-text-middle">{{:date('Y-m-d H:i:s', $v['add_time'])}}</td>
								<td class="am-operate-grid" data-width="170">
                                    <div class="am-scrollable-vertical">
										{{if $v['id'] eq 1}}
											<span class="cr-ccc">不可操作</span>
										{{else /}}
											<a class="am-btn am-btn-secondary am-btn-xs am-radius" href="{{:MyUrl('admin/power/rolesaveinfo', array('id'=>$v['id']))}}">
	                                            <i class="am-icon-edit"></i>
	                                            <span>编辑</span>
	    									</a>
											<button class="am-btn am-btn-danger am-btn-xs am-radius submit-delete" data-url="{{:MyUrl('admin/power/roledelete')}}" data-id="{{$v.id}}">
	                                            <i class="am-icon-trash-o"></i>
	                                            <span>删除</span>
	                                        </button>
										{{/if}}
									</div>
								</td>
							</tr>
						{{/foreach}}
					{{/if}}
				</tbody>
			</table>
            {{if empty($data_list)}}
                <div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
            {{/if}}
		</div>
		<!-- list end -->
	</div>
</div>
<!-- right content end  -->
		
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->